<?php

declare(strict_types=1);

namespace app\admin\middleware;

use app\admin\facade\Oauth;

class OauthMiddleware
{
    /**
     * 前置验证请求
     *
     * @param \think\Request $request
     * @param \Closure $next
     * @return Response
     */
    public function handle($request, \Closure $next)
    {
        Oauth::checkToken();
        Oauth::checkAuth();
        return $next($request);
    }
}
